/*
 * @Author: Wayne 13235388225@163.com
 * @Date: 2023-09-20 09:49:00
 * @LastEditors: Wayne 13235388225@163.com
 * @LastEditTime: 2023-10-11 16:29:59
 * @FilePath: \vue-element-admin\src\api\user.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from "@/utils/request";

// export function login(data) {
//   return request({
//     url: "/vue-element-admin/user/login",
//     method: "post",
//     data,
//   });
// }

export function getInfo(token) {
  return request({
    url: "/vue-element-admin/user/info",
    method: "get",
    params: { token },
  });
}

// export function logout() {
//   return request({
//     url: "/vue-element-admin/user/logout",
//     method: "post",
//   });
// }

// 获取热更新
export function getAppHotRefreshList(query) {
  return request({
    url: "/app/getAppHotRefreshList",
    method: "get",
    params: query,
  });
}

// 添加热更新记录
export function addAppHotRefresh(data) {
  return request({
    url: "/app/addAppHotRefresh",
    method: "post",
    data
  });
}

// 发布热更新
export function hotRefreshPush(data) {
  return request({
    url: "/app/hotRefreshPush",
    method: "post",
    data,
  });
}

export function login(data) {
  return request({
    url: "/app/adminUserLogin",
    method: "post",
    data,
  });
}
export function getMenu(id) {
  return request({
    url: `/app/getMenu?user_id=${id}`,
    method: "get",
  });
}
export function getAllPower() {
  return request({
    url: `/app/getAllPower`,
    method: "get",
  });
}
